Skip to content

Fix strange bug with regexes#25

Open
gilbert wants to merge 1 commit intoeugeneware:masterfrom
universal-systems:fix/global-regexes
Open

Fix strange bug with regexes#25
gilbert wants to merge 1 commit intoeugeneware:masterfrom
universal-systems:fix/global-regexes

Conversation

@gilbert
Copy link
Copy Markdown

@gilbert gilbert commented Feb 22, 2016

For some reason the regex isn't isn't updating x as it should.
I tried isolating, but no luck.
This fix is a bit more code, but it's good according to the spec,
so there should be no issues with backwards compatibility.

For some reason the regex isn't   isn't updating x as it should.
I tried isolating, but no luck.
This fix is a bit more code, but it's good according to the spec,
so there should be no issues with backwards compatibility.
@stevemao
Copy link
Copy Markdown
Collaborator

What exactly does it fix? Where is the updated test?

@gilbert
Copy link
Copy Markdown
Author

gilbert commented Feb 23, 2016

lastIndex updated as it should after one .exec() call, but afterwards reset to 0.

I will add a test when I get the chance. I just wanted to throw this up before I forgot about it.

@jaruba
Copy link
Copy Markdown

jaruba commented Apr 12, 2016

regular expressions don't work for me with or without this change..

I get:

Uncaught TypeError: Expected a string
at: node_modules\escape-string-regexp\index.js:7

this happens with the regex examples in README.md too.

@stevemao
Copy link
Copy Markdown
Collaborator

@jaruba This will be merged once a test has been added.

@stevemao
Copy link
Copy Markdown
Collaborator

@mindeavor can you add a test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants